//
//  LMmicroBlog.m
//  14微博
//
//  Created by apple on 15/8/2.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "LMmicroBlog.h"

@implementation LMmicroBlog

- (instancetype) initWithDic:(NSDictionary *) dic
{
    
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (instancetype) microBlogWithDic:(NSDictionary *) dic
{
    return [[self alloc] initWithDic:dic];
}
+ (NSArray *) microBlogToList
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"microblog" ofType:@"plist"];
    
    NSArray *dicArray = [NSArray arrayWithContentsOfFile:path];
    
    NSMutableArray *marray = [NSMutableArray array];
    
    for (NSDictionary *dic in dicArray) {
        LMmicroBlog *microblog = [LMmicroBlog microBlogWithDic:dic];
        
        [marray addObject:microblog];
        
    }
    return marray;
}
@end
